package com.flower.service.impl;

import com.flower.dao.ShoppingMapper;
import com.flower.pojo.Flower;
import com.flower.pojo.Shopping;
import com.flower.service.ShoppingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
@Service
public class ShoppingServiceImpl implements ShoppingService {
    @Autowired
    private ShoppingMapper shoppingMapper;
    @Override
    public List<Map<String, Object>> queryShopping(Integer uid) {
        return shoppingMapper.queryShopping(uid);
    }

    @Override
    public int delShopping(Integer spid) {
        return shoppingMapper.delShopping(spid);
    }

    @Override
    public int uptateShopping(Shopping shopping) {
        return shoppingMapper.uptateShopping(shopping);
    }

    @Override
    public List<Shopping> queryAll() {
        return shoppingMapper.queryAll();
    }

    @Override
    public Shopping queryShoppingByFid(Integer fid) {
        return shoppingMapper.queryShoppingByFid(fid);
    }

    @Override
    public int addShopping(Shopping shopping) {
        return shoppingMapper.addShopping(shopping);
    }

    @Override
    public int updateFnum(Shopping shopping) {
        return shoppingMapper.updateFnum(shopping);
    }

    @Override
    public Flower queryFlowerById(Integer fid) {
        return shoppingMapper.queryFlowerById(fid);
    }
}
